﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Automobile
{
    class Client
    {
        private string nume;
        private int varsta;
        private List<Cars> achizitii=new List<Cars>();

        public Client(string n, int v)
        {
            nume = n;
            varsta = v;
        }
        public void addCar(string nume, string culoare, string transmisie, string caracteristica)
        {
            Cars c;
            if (nume.CompareTo("Sedan") == 0)
            {
                c = new Sedan(nume, culoare, transmisie, caracteristica);
                achizitii.Add(c);
                

            }
            if (nume.CompareTo("Coupe") == 0)
            {
                c = new Coupe(nume, culoare, transmisie, caracteristica);
                achizitii.Add(c);
             
            }
            if (nume.CompareTo("Mini") == 0)
            {
                c = new Mini(nume, culoare, transmisie, caracteristica);
                achizitii.Add(c); 
               
                
            }
        }
        
    }
}
